package com.essroid.android.map;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class AndroidMapMenu extends Activity {

	private static final String TAG = "AndroidMapMenu";
	private Button mbtn1;
	private Button mbtn2;

	@Override
	protected void onCreate(Bundle savedInstanceState) {

		super.onCreate(savedInstanceState);
		setContentView(R.layout.androidmapmenu);

		mbtn1 = (Button)findViewById(R.id.btn1);
		mbtn2 = (Button)findViewById(R.id.btn2);

		mbtn1.setOnClickListener(
			new OnClickListener() {

				Intent intent;
				@Override
				public void onClick(View v) {
					switch (v.getId()) {
					case R.id.btn1:
						intent = new Intent();
						intent.setClass(getBaseContext(), AndroidMapView.class);
						break;
					case R.id.btn2:
						intent = new Intent();
						intent.setClass(getBaseContext(), AndroidMapMyLocationView.class);
						break;
					default:
						return;
					}
					startActivity(intent);
				}
			}
		);

		mbtn2.setOnClickListener(
				new OnClickListener() {

					Intent intent;
					@Override
					public void onClick(View v) {
						switch (v.getId()) {
						case R.id.btn1:
							intent = new Intent();
							intent.setClass(getBaseContext(), AndroidMapView.class);
							break;
						case R.id.btn2:
							intent = new Intent();
							intent.setClass(getBaseContext(), AndroidMapMyLocationView.class);
							break;
						default:
							return;
						}
						startActivity(intent);
					}
				}
		);

		Log.d(TAG, "onCreate");
	}


}
